package com.ambitor.ipro.labelParser;

import java.util.List;

import com.ambitor.grass.util.data.IData;
import com.ambitor.ipro.exceptions.ProException;
import com.ambitor.ipro.service.TopService;
import com.taobao.api.domain.Item;

public class LatestModifiedLabelParser extends IntellLabelParser {

	@Override
	public List<Item> parse() throws ProException {
		IData userSession = this.getUserSession();
		String sessionId = userSession.getString("SESSION_ID");
		String nick = userSession.getString("NICK");
		TopService topService = this.getTopService();
		return topService.getOnSaleItemsOrderByCertainField(sessionId, nick,
				this.getNum(), "modified", "desc");
	}
}
